# -*- coding: utf-8 -*-
"""
-------------------------------------------------
# @Project  :alien_invasion
# @File     :get_resource_path.py
# @Date     :2021/7/8 16:35
# @Author   :逆羽
# @Email    :xiehouxiayu@163.com
# @IDE      :PyCharm
-------------------------------------------------
"""
import os, sys


def resource_path(relative):
    if hasattr(sys, "_MEIPASS"):
        absolute_path = os.path.join(sys._MEIPASS, relative)
    else:
        absolute_path = os.path.join(relative)
    return absolute_path
